The present invention generally relates to image processing systems and methods, and more particularly to an image processing system and method for use in a real-time image input/output apparatus such as a facsimile machine or a copying machine for digitally processing image data read from a document so as to obtain a reproduced picture of high quality.
Recently, in image input/output apparatus such as a facsimile machine or a digital copying apparatus, image data read from a document is processed digitally and various signal processes are carried out thereon so as to obtain a reproduced picture of high quality.
Conventionally, various methods have been proposed to digitally process the image data of the document. As methods of processing a halftone image (multilevel image) in the facsimile machine, digital copying machine or the like, there are pseudo halftone descriptions of the image such as the so-called dither method. In other words, the local density of the image is detected as a change in the size of a dark point or a bright point. In the process of quantizing the variable density image (hereinafter referred to as dot image) into a binary display, that is, the digital image data, a threshold value used for the binarization is varied according to a random function or a pseudo random function and the density of the input image is described as a number of dots corresponding to a local average value.
When the dot image is described in the pseudo halftone, interference fringes (hereinafter referred to as a moire) occur due to the difference between a spatial frequency of the dots and a spatial frequency of the pseudo halftone description. In order to prevent this moire, the density of the dot image is smoothened by suppressing the density amplitude of the dots.
However, the density of the dots ranges from a fine dot pattern to a coarse dot pattern, and the smoothing process must be carried out over a large region when the moire is to be eliminated even for the coarse dot pattern. For this reason, the number of operations to be carried out increases and the operation time accordingly increases. In addition, it becomes necessary to use a large number of circuit elements and the image processing system becomes expensive.
FIG. 1 shows an example of a document reading apparatus. The document reading apparatus has an optical lens 2, a charge coupled device (CCD) 3, an amplifying circuit 4, an analog-to-digital (A/D) converting circuit 5, a clock driver 6, and a smoothing process circuit 7. MS and SS respectively denote a main scanning direction and a sub scanning direction in which a document 1 is scanned.
A description will now be given of a method of reading the document 1 on the document reading apparatus shown in FIG. 1. The document 1 is read by the scanning in two directions, that is, the main scanning direction MS in which the CCD 3 is electrically scanned and the sub scanning direction SS in which a scanning position on the document 1 is moved. The scan in the sub scanning direction SS may be carried out by moving the document 1 or by moving the optical system while keeping the document 1 stationary. A document image formed on the CCD 3 is outputted from the CCD 3 as an analog image signal, but this analog image signal has an extremely small amplitude and is thus amplified in the amplifying circuit 4. The amplified analog image signal from the amplifying circuit 4 is converted into a multilevel (for example, 64 gradation level) digital image signal for each picture element in the A/D converting circuit 5. The multilevel digital image signal from the A/D converting circuit 5 is supplied to the smoothing process circuit 7 and subjected to a smoothing process. The smoothed multilevel digital image signal from the smoothing process circuit 7 is further subjected to a pseudo halftone process (hereinafter referred to as a dither process) in a circuit which is omitted in FIG. 1.
In a copying machine, for example, the scan in the sub scanning direction SS is carried out by varying the moving speed of the document 1 during a variable power mode in the case where the scan in the sub scanning direction SS is carried out by moving the document 1. Similarly, the scan in the sub scanning direction SS is carried out by varying the moving speed of the optical system during the variable power mode in the case where the scan in the sub scanning direction SS is carried out by moving the optical system. Furthermore, the variable power is realized electrically in the main scanning direction MS, that is, by subtracting (decimation) and adding image information.
When the document image is a dot image and the dot image is outputted through a binarizaton process, that is, when a fixed threshold level is used, the moire occurs and the picture quality is deteriorated because the reading density of the CCD 3 differs from the density of the dot image. The use of the fixed threshold level means that a gradation level of 32 or more is assumed to be white (or black) when there are 64 gradation levels, for example. In addition, when the pseudo halftone description (dither description) is used for the dot image, the moire occurs due to a periodic difference between the input image read by the CCD 3 and the dither pattern. In order to prevent the above described moire, the density of the dots is smoothed so as to reduce the density amplitude of the dots.
But when the dot pattern is coarse, the smoothing must be carried out over a large region. As a result, there are problems in that the smoothing process circuit 7 becomes complex, bulky and expensive. Furthermore, the number of times the operation is carried out increases and the operation time increases, thereby limiting a high-speed processing of the image date.
FIG. 2 shows a smoothing matrix pattern for explaining a smoothing region in which the density of the dot image is smoothed. FIG. 2 shows for convenience sake a matrix pattern of five picture elements by five picture elements (hereinafter simply referred to as a 5.times.5 matrix pattern). An object picture element is indicated by a double hatching. The 5.times.5 matrix pattern shown in FIG. 2 has the object picture element located at the center with five picture elements arranged in the main scanning direction MS and five picture elements arranged in the sub scanning direction SS. In other words, the 5.times.5 matrix pattern indicates a region of 25 picture elements.
The smoothing region is of course not limited to the 5.times.5 matrix pattern, and the size of the smoothing region may be varied to a 3.times.3 matrix pattern, a 7.times.7 matrix pattern or the like depending on the reading density. The smoothing region indicated by the smoothing matrix pattern time-sequentially moves from the main scanning direction MS to the sub scanning direction SS and the entire region of the document is processed in real time.
The smoothing of the density with respect to the dot image is carried out by setting a weight of each picture element to "1" within the smoothing region described by the 5.times.5 matrix pattern. In other words, the density ratio is determined by the area ratio between the black picture elements and the total number (25) of picture elements within the smoothing region.
The density ratio in the matrix pattern is determined by a process of adding the weights "1" of all of the picture elements within the matrix pattern and dividing a final sum by a number of black picture elements within the matrix pattern. In the above described case where the smoothing region is the 5.times.5 matrix pattern, the weights "1" of all of the 25 picture elements are added. Such an addition of the weights is conventionally carried out in the following sequence.
First, the 25 picture element data are divided into group of 24 picture element data and one picture element datum, and the 24 picture element data within the group are added in twos so as to obtain twelve sums. The twelve sums are then added in twos to obtain six sums, and the six sums are further added in twos to obtain three sums. The three sums and the one picture element datum other than the 24 picture element data in the group are added in twos to obtain two sums, and these two sums are added to obtain a final sum. The sequence and number of additions can be summarized as follows, and a total number of additions carried out is 24 (=12+6+3+2+1).
(1) Twelve additions to add the 24 picture element data in twos;
(2) Six additions to add the twelve sums obtained in the step (1) in twos;
(3) Three additions to add the six sums obtained in the step (2) in twos;
(4) Two additions to add the three sums obtained in the step (3) and the one picture element datum other than the 24 picture element data in the group in twos; and
(5) One addition to add the two sums obtained in the step 4) so as to obtain the final sum.
When the weights of the picture elements are all "1" as described above, it is possible to first add the picture element data in only one column along the sub scanning direction SS indicated by hatchings by three additions, then latch the sum obtained within the one column in the main scanning direction MS four times, and add the five sums in the main scanning direction MS by three additions. In this case, it is possible to reduce the number of additions.
In the case where the weights of the picture elements are other than "1", it is possible to first multiply the weights to each picture element datum and then add the picture element data multiplied by the weights.
The pattern of the dot image ranges from the fine pattern to the coarse pattern, and the size of the smoothing matrix pattern increases as the pattern of the dot image becomes coarse. FIG. 3A through 3E respectively show the dot image applicable to the smoothing matrix pattern amounting to one line in the main scanning direction MS. Only the scan in the main scanning direction MS will be described because the same holds true for the scan in the sub scanning direction SS.
FIGS. 3A through 3E show the patterns of the dot image ranging from the fine pattern to the coarse pattern in this sequence, and the picture elements are either white or black (denoted by hatchings) so as to simplify the description. It is assumed that the phase of the white or black conforms to the picture elements. In FIG. 3A, the white (or black) amounting to one picture element occurs for every other picture elements. In FIG. 3B, the white (or black) amounting to two picture elements occur for every two picture elements. In FIG. 3C, the white (or black) amounting to three picture elements occur for every three picture elements. In FIG. 3D, the white (or black) amounting to four picture elements occur for every four picture elements. In FIG. 3E, the white (or black) amounting to four picture elements occur for every four picture elements.
FIGS. 4A through 4E are graphs respectively showing the density ratios of the dot image patterns shown in FIGS. 3A through 3E when samples are taken in the main scanning direction MS in the 5.times.5 smoothing matrix pattern shown in FIG. 2, where each picture element has the weight "1" and a center picture element out of five successive picture elements arranged in the main scanning direction MS is taken as the object picture element.
The density ration is 40% to 60% and the density amplitude of the dots is reduced in FIGS. 4A through 4C. But in FIGS. 4D and 4E, the dot pattern is coarse and the density amplitude of the dots is not reduced. Hence, during the dither process which is carried out in a latter stage, the moire occurs due to the interference between the coarse dot pattern and the dither pattern. But in order to reduce the moire even when the dot pattern is coarse as in FIGS. 4D and 4E, it is necessary to enlarge the smoothing matrix pattern which would consequently result in the need of a large scale operation.